\(\int (a+b \log (c (d+\frac {e}{f+g x})^p))^3 \, dx\) [637]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [F]
   Fricas [F]
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 22, antiderivative size = 168 \[ \int \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^3 \, dx=-\frac {3 b e p \log \left (-\frac {e}{d (f+g x)}\right ) \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^2}{d g}+\frac {(e+d (f+g x)) \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^3}{d g}-\frac {6 b^2 e p^2 \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right ) \operatorname {PolyLog}\left (2,1+\frac {e}{d (f+g x)}\right )}{d g}+\frac {6 b^3 e p^3 \operatorname {PolyLog}\left (3,1+\frac {e}{d (f+g x)}\right )}{d g} \]

[Out]

-3*b*e*p*ln(-e/d/(g*x+f))*(a+b*ln(c*(d+e/(g*x+f))^p))^2/d/g+(e+d*(g*x+f))*(a+b*ln(c*(d+e/(g*x+f))^p))^3/d/g-6*
b^2*e*p^2*(a+b*ln(c*(d+e/(g*x+f))^p))*polylog(2,1+e/d/(g*x+f))/d/g+6*b^3*e*p^3*polylog(3,1+e/d/(g*x+f))/d/g

Rubi [A] (verified)

Time = 0.14 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.318, Rules used = {2533, 2499, 2504, 2443, 2481, 2421, 6724} \[ \int \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^3 \, dx=-\frac {6 b^2 e p^2 \operatorname {PolyLog}\left (2,\frac {e}{d (f+g x)}+1\right ) \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )}{d g}-\frac {3 b e p \log \left (-\frac {e}{d (f+g x)}\right ) \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^2}{d g}+\frac {(d (f+g x)+e) \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^3}{d g}+\frac {6 b^3 e p^3 \operatorname {PolyLog}\left (3,\frac {e}{d (f+g x)}+1\right )}{d g} \]

[In]

Int[(a + b*Log[c*(d + e/(f + g*x))^p])^3,x]

[Out]

(-3*b*e*p*Log[-(e/(d*(f + g*x)))]*(a + b*Log[c*(d + e/(f + g*x))^p])^2)/(d*g) + ((e + d*(f + g*x))*(a + b*Log[
c*(d + e/(f + g*x))^p])^3)/(d*g) - (6*b^2*e*p^2*(a + b*Log[c*(d + e/(f + g*x))^p])*PolyLog[2, 1 + e/(d*(f + g*
x))])/(d*g) + (6*b^3*e*p^3*PolyLog[3, 1 + e/(d*(f + g*x))])/(d*g)

Rule 2421

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> Simp
[(-PolyLog[2, (-d)*f*x^m])*((a + b*Log[c*x^n])^p/m), x] + Dist[b*n*(p/m), Int[PolyLog[2, (-d)*f*x^m]*((a + b*L
og[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 2443

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[Log[e*((
f + g*x)/(e*f - d*g))]*((a + b*Log[c*(d + e*x)^n])^p/g), x] - Dist[b*e*n*(p/g), Int[Log[(e*(f + g*x))/(e*f - d
*g)]*((a + b*Log[c*(d + e*x)^n])^(p - 1)/(d + e*x)), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[e*
f - d*g, 0] && IGtQ[p, 1]

Rule 2481

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + Log[(h_.)*((i_.) + (j_.)*(x_))^(m_.)]*
(g_.))*((k_.) + (l_.)*(x_))^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[(k*(x/d))^r*(a + b*Log[c*x^n])^p*(f + g*Lo
g[h*((e*i - d*j)/e + j*(x/e))^m]), x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, j, k, l, n, p, r},
 x] && EqQ[e*k - d*l, 0]

Rule 2499

Int[((a_.) + Log[(c_.)*((d_) + (e_.)/(x_))^(p_.)]*(b_.))^(q_), x_Symbol] :> Simp[(e + d*x)*((a + b*Log[c*(d +
e/x)^p])^q/d), x] + Dist[b*e*p*(q/d), Int[(a + b*Log[c*(d + e/x)^p])^(q - 1)/x, x], x] /; FreeQ[{a, b, c, d, e
, p}, x] && IGtQ[q, 0]

Rule 2504

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[I
nt[x^(Simplify[(m + 1)/n] - 1)*(a + b*Log[c*(d + e*x)^p])^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p,
 q}, x] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0]) &&  !(EqQ[q, 1] && ILtQ[n, 0] &&
 IGtQ[m, 0])

Rule 2533

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*((f_.) + (g_.)*(x_))^(n_))^(p_.)]*(b_.))^(q_.), x_Symbol] :> Dist[1/g, Su
bst[Int[(a + b*Log[c*(d + e*x^n)^p])^q, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && IGtQ[q
, 0] && (EqQ[q, 1] || IntegerQ[n])

Rule 6724

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \left (a+b \log \left (c \left (d+\frac {e}{x}\right )^p\right )\right )^3 \, dx,x,f+g x\right )}{g} \\ & = \frac {(e+d (f+g x)) \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^3}{d g}+\frac {(3 b e p) \text {Subst}\left (\int \frac {\left (a+b \log \left (c \left (d+\frac {e}{x}\right )^p\right )\right )^2}{x} \, dx,x,f+g x\right )}{d g} \\ & = \frac {(e+d (f+g x)) \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^3}{d g}-\frac {(3 b e p) \text {Subst}\left (\int \frac {\left (a+b \log \left (c (d+e x)^p\right )\right )^2}{x} \, dx,x,\frac {1}{f+g x}\right )}{d g} \\ & = -\frac {3 b e p \log \left (-\frac {e}{d (f+g x)}\right ) \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^2}{d g}+\frac {(e+d (f+g x)) \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^3}{d g}+\frac {\left (6 b^2 e^2 p^2\right ) \text {Subst}\left (\int \frac {\log \left (-\frac {e x}{d}\right ) \left (a+b \log \left (c (d+e x)^p\right )\right )}{d+e x} \, dx,x,\frac {1}{f+g x}\right )}{d g} \\ & = -\frac {3 b e p \log \left (-\frac {e}{d (f+g x)}\right ) \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^2}{d g}+\frac {(e+d (f+g x)) \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^3}{d g}+\frac {\left (6 b^2 e p^2\right ) \text {Subst}\left (\int \frac {\left (a+b \log \left (c x^p\right )\right ) \log \left (-\frac {e \left (-\frac {d}{e}+\frac {x}{e}\right )}{d}\right )}{x} \, dx,x,d+\frac {e}{f+g x}\right )}{d g} \\ & = -\frac {3 b e p \log \left (-\frac {e}{d (f+g x)}\right ) \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^2}{d g}+\frac {(e+d (f+g x)) \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^3}{d g}-\frac {6 b^2 e p^2 \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right ) \text {Li}_2\left (\frac {d+\frac {e}{f+g x}}{d}\right )}{d g}+\frac {\left (6 b^3 e p^3\right ) \text {Subst}\left (\int \frac {\text {Li}_2\left (\frac {x}{d}\right )}{x} \, dx,x,d+\frac {e}{f+g x}\right )}{d g} \\ & = -\frac {3 b e p \log \left (-\frac {e}{d (f+g x)}\right ) \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^2}{d g}+\frac {(e+d (f+g x)) \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^3}{d g}-\frac {6 b^2 e p^2 \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right ) \text {Li}_2\left (\frac {d+\frac {e}{f+g x}}{d}\right )}{d g}+\frac {6 b^3 e p^3 \text {Li}_3\left (\frac {d+\frac {e}{f+g x}}{d}\right )}{d g} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(441\) vs. \(2(168)=336\).

Time = 0.43 (sec) , antiderivative size = 441, normalized size of antiderivative = 2.62 \[ \int \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^3 \, dx=\frac {3 b d p (f+g x) \log \left (d+\frac {e}{f+g x}\right ) \left (a-b p \log \left (d+\frac {e}{f+g x}\right )+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^2+d (f+g x) \left (a-b p \log \left (d+\frac {e}{f+g x}\right )+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^3+3 b e p \left (a-b p \log \left (d+\frac {e}{f+g x}\right )+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^2 \log (e+d (f+g x))+3 b^2 p^2 \left (a-b p \log \left (d+\frac {e}{f+g x}\right )+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right ) \left (d (f+g x) \log ^2\left (d+\frac {e}{f+g x}\right )+e \left (\log ^2\left (\frac {e}{d}+f+g x\right )+2 \left (\log (f+g x)-\log \left (\frac {e}{d}+f+g x\right )+\log \left (d+\frac {e}{f+g x}\right )\right ) \log (e+d (f+g x))-2 \left (\log (f+g x) \log \left (1+\frac {d (f+g x)}{e}\right )+\operatorname {PolyLog}\left (2,-\frac {d (f+g x)}{e}\right )\right )\right )\right )+b^3 p^3 \left (\log ^2\left (d+\frac {e}{f+g x}\right ) \left (-3 e \log \left (-\frac {e}{d f+d g x}\right )+(e+d f+d g x) \log \left (d+\frac {e}{f+g x}\right )\right )-6 e \log \left (d+\frac {e}{f+g x}\right ) \operatorname {PolyLog}\left (2,1+\frac {e}{d f+d g x}\right )+6 e \operatorname {PolyLog}\left (3,1+\frac {e}{d f+d g x}\right )\right )}{d g} \]

[In]

Integrate[(a + b*Log[c*(d + e/(f + g*x))^p])^3,x]

[Out]

(3*b*d*p*(f + g*x)*Log[d + e/(f + g*x)]*(a - b*p*Log[d + e/(f + g*x)] + b*Log[c*(d + e/(f + g*x))^p])^2 + d*(f
 + g*x)*(a - b*p*Log[d + e/(f + g*x)] + b*Log[c*(d + e/(f + g*x))^p])^3 + 3*b*e*p*(a - b*p*Log[d + e/(f + g*x)
] + b*Log[c*(d + e/(f + g*x))^p])^2*Log[e + d*(f + g*x)] + 3*b^2*p^2*(a - b*p*Log[d + e/(f + g*x)] + b*Log[c*(
d + e/(f + g*x))^p])*(d*(f + g*x)*Log[d + e/(f + g*x)]^2 + e*(Log[e/d + f + g*x]^2 + 2*(Log[f + g*x] - Log[e/d
 + f + g*x] + Log[d + e/(f + g*x)])*Log[e + d*(f + g*x)] - 2*(Log[f + g*x]*Log[1 + (d*(f + g*x))/e] + PolyLog[
2, -((d*(f + g*x))/e)]))) + b^3*p^3*(Log[d + e/(f + g*x)]^2*(-3*e*Log[-(e/(d*f + d*g*x))] + (e + d*f + d*g*x)*
Log[d + e/(f + g*x)]) - 6*e*Log[d + e/(f + g*x)]*PolyLog[2, 1 + e/(d*f + d*g*x)] + 6*e*PolyLog[3, 1 + e/(d*f +
 d*g*x)]))/(d*g)

Maple [F]

\[\int {\left (a +b \ln \left (c \left (d +\frac {e}{g x +f}\right )^{p}\right )\right )}^{3}d x\]

[In]

int((a+b*ln(c*(d+e/(g*x+f))^p))^3,x)

[Out]

int((a+b*ln(c*(d+e/(g*x+f))^p))^3,x)

Fricas [F]

\[ \int \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^3 \, dx=\int { {\left (b \log \left (c {\left (d + \frac {e}{g x + f}\right )}^{p}\right ) + a\right )}^{3} \,d x } \]

[In]

integrate((a+b*log(c*(d+e/(g*x+f))^p))^3,x, algorithm="fricas")

[Out]

integral(b^3*log(c*((d*g*x + d*f + e)/(g*x + f))^p)^3 + 3*a*b^2*log(c*((d*g*x + d*f + e)/(g*x + f))^p)^2 + 3*a
^2*b*log(c*((d*g*x + d*f + e)/(g*x + f))^p) + a^3, x)

Sympy [F]

\[ \int \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^3 \, dx=\int \left (a + b \log {\left (c \left (d + \frac {e}{f + g x}\right )^{p} \right )}\right )^{3}\, dx \]

[In]

integrate((a+b*ln(c*(d+e/(g*x+f))**p))**3,x)

[Out]

Integral((a + b*log(c*(d + e/(f + g*x))**p))**3, x)

Maxima [F]

\[ \int \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^3 \, dx=\int { {\left (b \log \left (c {\left (d + \frac {e}{g x + f}\right )}^{p}\right ) + a\right )}^{3} \,d x } \]

[In]

integrate((a+b*log(c*(d+e/(g*x+f))^p))^3,x, algorithm="maxima")

[Out]

-3*a^2*b*e*g*p*(f*log(g*x + f)/(e*g^2) - (d*f + e)*log(d*g*x + d*f + e)/(d*e*g^2)) + 3*a^2*b*x*log(c*(d + e/(g
*x + f))^p) + a^3*x + (b^3*d*g*x*log((d*g*x + d*f + e)^p)^3 - 3*(b^3*d*f*p*log(g*x + f) + b^3*d*g*x*log((g*x +
 f)^p) - (d*f*p + e*p)*b^3*log(d*g*x + d*f + e) - (b^3*d*g*log(c) + a*b^2*d*g)*x)*log((d*g*x + d*f + e)^p)^2)/
(d*g) + integrate(((d*f + e)*b^3*log(c)^3 + 3*(d*f + e)*a*b^2*log(c)^2 - (b^3*d*g*x + (d*f + e)*b^3)*log((g*x
+ f)^p)^3 + 3*((d*f + e)*b^3*log(c) + (d*f + e)*a*b^2 + (b^3*d*g*log(c) + a*b^2*d*g)*x)*log((g*x + f)^p)^2 + (
b^3*d*g*log(c)^3 + 3*a*b^2*d*g*log(c)^2)*x + 3*(2*b^3*d*f*p^2*log(g*x + f) + (d*f + e)*b^3*log(c)^2 - 2*(d*f*p
^2 + e*p^2)*b^3*log(d*g*x + d*f + e) + 2*(d*f + e)*a*b^2*log(c) + (b^3*d*g*x + (d*f + e)*b^3)*log((g*x + f)^p)
^2 - (2*(d*g*p - d*g*log(c))*a*b^2 + (2*d*g*p*log(c) - d*g*log(c)^2)*b^3)*x - 2*((d*f + e)*b^3*log(c) + (d*f +
 e)*a*b^2 + (a*b^2*d*g - (d*g*p - d*g*log(c))*b^3)*x)*log((g*x + f)^p))*log((d*g*x + d*f + e)^p) - 3*((d*f + e
)*b^3*log(c)^2 + 2*(d*f + e)*a*b^2*log(c) + (b^3*d*g*log(c)^2 + 2*a*b^2*d*g*log(c))*x)*log((g*x + f)^p))/(d*g*
x + d*f + e), x)

Giac [F]

\[ \int \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^3 \, dx=\int { {\left (b \log \left (c {\left (d + \frac {e}{g x + f}\right )}^{p}\right ) + a\right )}^{3} \,d x } \]

[In]

integrate((a+b*log(c*(d+e/(g*x+f))^p))^3,x, algorithm="giac")

[Out]

integrate((b*log(c*(d + e/(g*x + f))^p) + a)^3, x)

Mupad [F(-1)]

Timed out. \[ \int \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right )^3 \, dx=\int {\left (a+b\,\ln \left (c\,{\left (d+\frac {e}{f+g\,x}\right )}^p\right )\right )}^3 \,d x \]

[In]

int((a + b*log(c*(d + e/(f + g*x))^p))^3,x)

[Out]

int((a + b*log(c*(d + e/(f + g*x))^p))^3, x)